#ifndef VRP_COPYCOLOR_INCLUDED
#define VRP_COPYCOLOR_INCLUDED
struct Attributes
{
    float4 positionOS   : POSITION;
    float2 uv           : TEXCOORD0;
};

struct Varyings
{
    half4 positionCS    : SV_POSITION;
    half2 uv            : TEXCOORD0;
};
float3 ACESToneMapping(float3 x)
{
    float a = 2.51f;
    float b = 0.03f;
    float c = 2.43f;
    float d = 0.59f;
    float e = 0.14f;
    return saturate((x*(a*x+b))/(x*(c*x+d)+e));
}      
Texture2D _BlitTex;
SamplerState sampler_BlitTex;


Varyings Vertex(Attributes input)
{
    Varyings output;
    output.positionCS =TransformObjectToHClip(input.positionOS.xyz);
    output.uv = input.uv;
    return output;
}

float4 Fragment(Varyings input) : SV_Target
{
    float4 col=_BlitTex.Sample(sampler_BlitTex, input.uv);
    float3 tonemap=ACESToneMapping(col.rgb);
    tonemap=pow(tonemap,1/2.2);
    return float4(tonemap,1);
               
                
}
#endif